<div class="dailyCheck main">
	<bid-tabs
	  query-fn="dailyCheck.paginationQuery"
	  query-bean="dailyCheck.queryData"
	  query-param="bidId"
	  query-type="bid"></bid-tabs>
	<div class="query-info shadowbox">
		<div class="container-header">巡查记录</div>
		<form class="base-info pa-form-content"
			name="queryForm" novalidate>
			<div class="pa-form-control pa-form-control-inline">
			  <label>巡查名称：</label>
			  <input type="text" class="form-control-input"
			    ng-model="dailyCheck.queryData.taskName">
			</div>
			<div class="pa-form-control pa-form-control-inline">
			  <label>巡查单位：</label>
			  <select name="checkUnit"
			  	ng-model="dailyCheck.queryData.role">
			  	<option value=""></option>
			  	<option value="0">指挥部</option>
			  	<option value="1">总监办</option>
			  	<option value="2">项目部</option>
			  </select>
			</div>
			<div class="pa-form-control pa-form-control-inline">
			  <label>巡查状态：</label>
			  <select name="checkResult"
			  	ng-model="dailyCheck.problemStatus">
			  	<option value=""></option>
			  	<option value="1">未完成</option>
			  	<option value="3">已完成</option>
			  </select>
			</div>
			<div class="pa-form-control pa-form-control-inline">
				<label>巡查时间：</label>
				<input type="text" class="form-control-input" ng-datepicker name="startTime"  
					ng-model="dailyCheck.queryData.checkCompletedTimeFrom">
					到
				<input type="text" class="form-control-input" ng-datepicker name="endTime"
				  ng-model="dailyCheck.queryData.checkCompletedTimeTo">
			</div>
		</form>
		<div class="btn-outer-right">			
			<a class="pa-btn"
				ng-click="dailyCheck.query(queryForm)">
				<i class="fa fa-search"></i>
				<span class="ml5">查询</span>
			</a>
			<a class="pa-btn reset-btn"
				ng-click="dailyCheck.reset()">
				<i class="fa fa-repeat"></i>
				<span class="ml5">重置</span>
			</a>		
		</div>
	</div>
	<!-- 巡查记录 -->
	<div class="pa-table-container shadowbox">
		<form class="base-info">
			<table class="pa-table">
				<thead>
					<tr>
						<th>巡查名称</th>
						<th>巡查地点</th>
						<th>巡查单位</th>
						<th>巡查分类</th>
						<th>巡查时长（分钟）</th>
						<th>内容数量</th>
						<th>巡查状态</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="item in dailyCheck.dailyCheckList">
						<td>{{item.taskName}}</td>
						<td>{{item.bidName}}</td>
						<td>{{item.role == '0' ? '指挥部' : 
									item.role == '1' ? '总监办' :
									item.role == '2' ? '项目部' : ''}}</td>						
						<td class="daily-overflow">{{item.classifyNames}}</td>
						<td>{{item.checkPeriod}}</td>
						<td>{{item.contentNum}}</td>
						<td
							ng-class="{'has-complete': item.status == '3',
          		'nostart': item.status == '2'}">
          		{{item.status == '3' ? '已完成' : '未完成'}}
        		</td>
						<td class="check">
							<div class="del"
								authorization-btn="api/checkRecord/app/queryContentList"
								ng-click="dailyCheck.showDetail(item.taskId)">
								<i class="fa fa-street-view color"></i>
								<span>查看内容</span>
							</div>
							<div class="del"
								ng-if="item.status == '3'"
								ng-click="dailyCheck.showTrackHistory(item.taskId)">
								<i class="fa fa-street-view color"></i>
								<span>巡查轨迹</span>
							</div>
						</td>							
					</tr>
				</tbody>
			</table>
		</form>
		<div class="total-num">
		  共计<span class="total-num-colorful">
		  {{dailyCheck.paginationData.total}}</span>条
		</div>
		<!-- 分页 -->
		<div class="pagination-outer">
      <uib-pagination
        total-items="dailyCheck.paginationData.total"
        ng-model="dailyCheck.paginationData.pageNum"
        items-per-page="dailyCheck.paginationData.pageSize"
        ng-change="pageChange()"
        class="pagination-sm"
        boundary-link-numbers="true"
        max-size="5"
        next-text="下一页"
        previous-text="上一页"></uib-pagination>
		</div>
	</div>
	<!-- 内容 -->
	<div class="pa-table-container shadowbox" id="check_list"
		ng-show="dailyCheck.showDetailList">		
		<div class="container-header" style="margin-left: -10px;margin-top: -13px;">巡查内容</div>
		<form class="base-info" style="margin-top: 20px;">
			<table class="pa-table">
				<thead>
					<tr>
						<th>内容编号</th>
						<th>巡查分类</th>
						<th>巡查结果</th>					
						<th class="time-sequence">
							<div>整改期限</div>
							<!-- <div class="time-sequence-btn">
							  <div class="time-sequence-box"
							    ng-click="dailyCheck.up('problem_deadline','0')">
							    <i class="fa fa-caret-up"></i>
							  </div>
							  <div class="time-sequence-box"
							    ng-click="dailyCheck.up('problem_deadline','1')">
							    <i class="fa fa-caret-down"></i>
							  </div> 
							</div> -->
						</th>
						<th>内容提交时间</th>
						<th>状态</th>
						<th>操作</th>
					</tr>
				</thead>
				<tbody>
					<tr ng-repeat="item in dailyCheck.dailyCheckDetailList">
						<td>{{item.contentNumber}}</td>
						<td>{{item.checkClassifyName}}</td>
						<td>{{item.problemStatus == '3' ? '符合要求' : '不符合要求'}}</td>
						<td>{{item.problemDeadline1}}</td>
						<td>{{item.problemFoundTime1}}</td>
						<td
							ng-class="{'nostart': item.problemStatus == '0',
												'ongoing': item.problemStatus == '1',
        								'has-complete': item.problemStatus == '2'}">
	            {{item.problemStatus == 3 ? '符合要求' : 
		            item.problemStatus == 2 ? '已完成' : 
		          	item.problemStatus == 1 ? '待审核' :
								item.problemStatus == 0 ? '待整改' : ''}}
						</td>	
						<td>
							<div class="del"
								authorization-btn="api/checkRecord/app/queryContentDetail"
								ng-click="dailyCheck.checkDetail(item)">
								<i class="fa fa-street-view color"></i>
								<span>详情</span>
							</div>
						</td>							
					</tr>
				</tbody>
			</table>
		</form>
	</div>
	
	<!-- 巡查轨迹 -->
	<script type="text/ng-template" id="patrolPath">
		<div class="item-detail-dialog specialCheck-dialog">
		  <div class="item-detail-dialog-header">
		    <div class="title-txt">
		      <span>巡查轨迹</span>
		    </div>
		  </div>
		  <div class="item-detail-dialog-content">
		  	<div class="track-tabs clear">
		  		<div class="path-item"
		  			ng-class="{'active': vm.shouldMapShow}"
		  			ng-click="vm.showMap()">地图轨迹</div>
		  		<div class="path-item" ng-repeat="item in vm.dailyCheckDetailList"
		  			ng-class="{'active': !vm.shouldMapShow && $index == vm.selectedIndex}"
		  			ng-click="vm.showProblemDetail(item.problemId, $index)">
		  			{{item.contentNumber}}
	  			</div>
		  	</div>
		  	<div class="track-content-outer">
		  		<div id="bdmap_container" style="width: 100%; height: 500px; border: 1px solid #ccc;" class="map-content"
		  			ng-show="vm.shouldMapShow"></div>
		  		<div class="problem-detail-content" ng-if="!vm.shouldMapShow">
	  			  <div class="rectification-detail">
	  			    <!-- 展示需要整改问题 -->
	  			    <div class="issue-detail-container shadowbox"  style="margin-top: 1px;">
	  			      <div class="title">
	  			        <div class="title-txt">
	  			          <i class="fa fa-pencil-square-o"></i>
	  			          <span>内容说明</span>
	  			        </div>
	  			      </div>
	  			      <div class="content">
	  			        <div class="row-dash">
	  			          <div class="row-item">
	  			            <span class="item-label">内容编号：</span>
	  			            <span class="item-value red-txt">
	  			              {{vm.detailList.contentNumber}}
	  			            </span>
	  			          </div>
	  			          <div class="row-item">
	  			            <span class="item-label">巡查记录：</span>
	  			            <span class="item-value">
	  			              {{vm.detailList.taskName}}
	  			            </span>
	  			          </div>
	  			        </div>
	  			        <div class="row-dash">
	  			          <div class="row-item">
	  			            <span class="item-label">巡查分类：</span>
	  			            <span class="item-value red-txt">
	  			              {{vm.detailList.checkClassifyName}}
	  			            </span>
	  			          </div>
	  			          <div class="row-item">
	  			            <span class="item-label">提交时间：</span>
	  			            <span class="item-value red-txt">
	  			              {{vm.detailList.problemFoundTime1}}
	  			            </span>
	  			          </div>
	  			        </div>
	  			        <div class="row-dash">
	  			          <div class="row-item">
	  			            <span class="item-label">巡查人：</span>
	  			            <span class="item-value">
	  			              {{vm.detailList.problemFoundUser}}
	  			            </span>
	  			          </div>
	  			          <div class="row-item">
	  			            <span class="item-label">巡查单位：</span>
	  			            <span class="item-value">
	  			              {{vm.detailList.responsibilityUnit}}
	  			            </span>
	  			          </div>
	  			        </div>
	  			        <div class="row-dash">
	  			          <div class="row-item">
	  			            <span class="item-label">巡查地点：</span>
	  			            <span class="item-value">
	  			              {{vm.detailList.bidName}}
	  			            </span>
	  			          </div>
	  			          <div class="row-item">
	  			            <span class="item-label">施工队：</span>
	  			            <span class="item-value">
	  			              {{vm.detailList.teamName}}
	  			            </span>
	  			          </div>
	  			        </div>
	  			        <div class="row-dash"
	  			          ng-hide="vm.detailList.problemStatus == 3">
	  			          <div class="row-item">
	  			            <span class="multiple-rows-label">整改期限：</span>
	  			            <span class="multiple-rows-value">
	  			              {{vm.detailList.problemDeadline1}}
	  			            </span>
	  			          </div>
	  			        </div>
	  			        <div class="row-dash"
	  			          ng-hide="vm.detailList.problemStatus == 3">
	  			          <div class="row-item" style="width: 100%;">
	  			            <span class="item-label">内容场景：</span>
	  			            <span class="item-value">
	  			              {{vm.detailList.problemScenarios}}
	  			            </span>
	  			          </div>
	  			        </div>
	  			        <div class="row-dash">
	  			          <div class="row-item">
	  			            <span class="item-label">描述：</span>
	  			            <span class="item-value">
	  			              {{vm.detailList.problemDescription}}
	  			            </span>
	  			          </div>
	  			        </div>
	  			        <div class="issue-pics">
	  			          <div class="issue-pics-title">照片</div>
	  			          <div class="issue-pics-container">
	  			            <img
	  			              ng-repeat="item in vm.detailList.fileBeanList" 
	  			              ng-src="{{serverIp}}/{{item.filePath}}"
	  			              ng-click="vm.preview(item)">
	  			          </div>
	  			        </div>
	  			      </div>
	  			    </div>

	  			    <!-- 展示整改完成情况 -->
	  			    <div class="issue-detail-container shadowbox" 
	  			      ng-hide="vm.detailList.problemStatus == 0 || vm.detailList.problemStatus == 3">
	  			      <div class="title">
	  			        <div class="title-txt">
	  			          <i class="fa fa-wrench"></i>
	  			          <span>整改情况</span>
	  			        </div>
	  			      </div>
	  			      <div class="content">
	  			        <div class="row-dash">
	  			          <div class="row-item">
	  			            <span class="item-label">整改提交人：</span>
	  			            <span class="item-value">
	  			              {{vm.detailList.problemModifyBean.problemModifyUserName}}
	  			            </span>
	  			          </div>
	  			          <div class="row-item">
	  			            <span class="item-label">提交时间：</span>
	  			            <span class="item-value">
	  			              {{vm.detailList.problemModifyBean.modifyTime1}}
	  			            </span>
	  			          </div>
	  			        </div>
	  			        <div class="row-dash">
	  			            <span class="item-label fl">原因分析：</span>
	  			            <span class="item-value" style="display: block;margin-left:60px;">
	  			              {{vm.detailList.problemModifyBean.causeAnalysis}}
	  			            </span>
	  			        </div>
	  			        <div class="row-dash">
	  			          <span class="multiple-rows-label">整改说明：</span>
	  			          <span class="multiple-rows-value" style="color: #858585;">
	  			            {{vm.detailList.problemModifyBean.modifyDescription}}
	  			          </span>
	  			        </div>      
	  			        <div class="issue-pics">
	  			          <div class="issue-pics-title">照片</div>
	  			          <div class="issue-pics-container">
	  			            <img
	  			              ng-repeat="item in vm.detailList.problemModifyBean.fileBeanList"
	  			              ng-src="{{serverIp}}/{{item.filePath}}"
	  			              ng-click="vm.preview(item)"/>
	  			          </div>
	  			        </div>     
	  			      </div>
	  			    </div>

	  			    <!-- 提交整改后照片 新增 -->
	  			    <div class="item-container shadowbox"
	  			      ng-show="vm.detailList.problemStatus == 0">
	  			      <div class="title">
	  			        <div class="title-txt">
	  			          <i class="fa fa-wrench"></i>
	  			          <span>上传整改后照片</span>
	  			        </div>
	  			      </div>
	  			      <div class="content">
	  			        <div class="single-row">
	  			          <div class="row-item w30">
	  			            <span class="label">责任单位：</span>
	  			            <span class="row-value">{{vm.detailList.responsibilityUnit}}</span>
	  			          </div>          
	  			        </div>
	  			        <div class="single-row">
	  			          <div class="row-item">
	  			            <span class="label">整改时间：</span>
	  			            <input type="text" style="width: 0;height: 0;opacity: 0;">
	  			            <input type="text" ng-datepicker
	  			              style="margin-left: -20px;" 
	  			              ng-model="vm.rectificationList.modifyTime" />
	  			          </div>
	  			        </div>
	  			        <div class="single-row">
	  			          <div class="row-item">
	  			            <span class="label">原因分析：</span>
	  			            <span>以下方面存在不足</span>
	  			            <div class="reasons">
	  			              <button class="sel-btn-primary"
	  			                ng-class="{'active': reason.active ? true : false}"
	  			                ng-click="reason.active = !reason.active"
	  			                ng-repeat="reason in vm.reasons">{{reason.name}}</button>
	  			            </div>          
	  			          </div>
	  			        </div>
	  			        <div class="single-row">
	  			          <div class="row-item">
	  			            <span class="label v-middle">整改说明：</span>
	  			            <div class="right-item-outer">
	  			              <textarea class="v-middle" cols="30" rows="10"
	  			                placeholder="请输入整改情况" 
	  			                ng-model="vm.rectificationList.modifyDescription"></textarea>
	  			            </div>
	  			          </div>
	  			        </div>
	  			        <div class="single-row">
	  			          <div class="row-item">
	  			            <div class="right-item-outer pic-upload-container" >
	  			              <common-attachment-upload
	  			                component-id="cp2"
	  			                file-type="image"
	  			                pick-btn-id="avatar_attachment_picker1"
	  			                upload-url="{{fileUploadUrl.problemModifyBean}}"
	  			                file-list="vm.detailList.problemModifyBean.fileBeanList"
	  			                is-uploading="vm.isUploading">
	  			              </common-attachment-upload>
	  			            </div> 
	  			          </div>
	  			        </div>
	  			        <div class="single-row">
	  			          <div class="right-outer"
	  			            authorization-btn="api/securityActivities/problemModify/addProblemModify" 
	  			            ng-click="vm.submit()">
	  			            <a class="pa-btn pure-btn">提交</a>
	  			          </div>
	  			        </div>
	  			      </div>
	  			    </div>

	  			    <!-- 审批 -->
	  			    <div class="item-container shadowbox"
	  			      ng-if="vm.isAuditable()">
	  			      <div class="title">
	  			        <div class="title-txt">
	  			          <i class="fa fa-calendar"></i>
	  			          <span style="margin-left: 2px">审批</span>
	  			        </div>
	  			      </div>
	  			      <div class="content">
	  			        <div class="single-row">
	  			          <div class="right-outer approval-through">
	  			            <input type="radio" class="sex-checkbox" value="1" 
	  			              ng-model="vm.approval.checkResult" /><span>通过</span>
	  			            <input type="radio" class="sex-checkbox" value="0" 
	  			              ng-model="vm.approval.checkResult" /><span>不通过</span>
	  			          </div>
	  			        </div>
	  			        <div class="single-row">
	  			          <div class="right-outer">
	  			            <textarea name="" id="" cols="30" rows="10" 
	  			              placeholder="请输入整改意见"
	  			              ng-model="vm.approval.comments"></textarea>
	  			          </div>
	  			        </div>
	  			      </div>
	  			      <!-- 提交按钮 -->
	  			      <div class="btn-outer" style="padding-left: 34%; text-align: left;"
	  			        ng-show="vm.detailList.problemStatus == 1">
	  			        <a class="pa-btn"
	  			          authorization-btn="api/securityActivities/problemModify/auditModifyProblem"
	  			          ng-click="vm.approvalSubmit()">
	  			          <i class="fa fa-save"></i>
	  			          <span class="ml5">提交</span>
	  			        </a>
	  			        <a class="pa-btn reset-btn" ng-click="vm.reset()">
	  			          <i class="fa fa-repeat"></i>
	  			          <span class="ml5">重置</span>
	  			        </a>
	  			      </div>
	  			    </div>  			    

	  			    <!-- 展示审批状态 -->
	  			    <div class="item-container issue-detail-container shadowbox"
	  			      ng-show="(vm.approval.checkResult == '0' && vm.detailList.problemStatus == '0') || vm.detailList.problemStatus == '2'">
	  			      <div class="title">
	  			        <div class="title-txt">
	  			          <i class="fa fa-calendar"></i>
	  			          <span style="margin-left: 2px">审批</span>
	  			        </div>
	  			      </div>
	  			      <div class="content">
	  			        <div class="row-dash">
	  			          <div class="row-item">
	  			            <label class="item-label">审批人：</label>
	  			            <span class="item-value">{{vm.approval.auditUserName}}</span>
	  			          </div>
	  			          <div class="row-item">
	  			            <label class="item-label">审批时间：</label>
	  			            <span class="item-value">{{vm.approval.updateTime1}}</span>
	  			          </div>      
	  			        </div>
	  			        <div class="row-dash">
	  			          <div class="row-item">
	  			            <label class="item-label">审批结果：</label>
	  			            <span class="item-value">
	  			              {{vm.approval.checkResult == '0' ? '未通过' : 
	  			              vm.approval.checkResult == '1' ? '通过' : ''}}</span>
	  			          </div>
	  			          <div class="row-item">
	  			            <label class="item-label">审批意见：</label>
	  			            <span class="item-value">{{vm.approval.comments}}</span>
	  			          </div>      
	  			        </div>
	  			      </div>
	  			    </div>
	  			  </div>
		  		</div>
		  	</div>
		  </div>
		</div>
	</script>
</div>